<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html">
	
<head>
<title>Results for #{mainBean.resultWithoutSuggestions.originalQuery}</title>
<meta charset="utf-8"></meta>
<!-- Viewport image scale for the mobile phone initial scale set to 1 -->
<meta name="viewport" content="width=device-width, initial-scale=1.0"></meta>
<meta name="description" content="Descrizione Prova"></meta>
<meta name="keywords" content="Chiavi Prova"></meta>
<meta name="author" content="Nome del Gruppo"></meta>
<!-- CSS Class Region -->
<link rel="stylesheet" href="css/bootstrap.css" ></link>
<link rel="stylesheet" href="css/style.css"></link>
<link rel="stylesheet" href="fonts/font-awesome.css"></link>
<!-- JS Class Region -->
<script src="js/jquery.js"></script>
<script src="js/jquery.mobilemenu.js"></script>
<!--[if lt IE 9]>
    <div style='text-align:center'><a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode"><img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." /></img></a></div>  
  <![endif]-->
  <!-- Display dell'errore di HTML5 Responsive non supportato -->
  <!--[if lt IE 9]><script src="../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

  <!-- HTML5 shim and Respond.js IE8 supporto per HTML5 -->
  <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
  <![endif]-->
</head>
<body>
<!--header-->
<header>
    <div class="container">
        <div class="row">
            <article class="col-lg-12 col-md-12 col-sm-12">
			<div class="home_div_src">
				<div align="center">
				
				<h:form>
					<table style="width: 100%">
					<tr>					
							<td COLSPAN="3" align="center"><a href="main.xhtml"><img src="img/logo.png" alt="" style="padding-top: 2px"></img></a></td>
					</tr>
						<tr>
							<td style="width: 95%"><h:inputText value="#{mainBean.queryString}" class="textbox" style="width: 100%"></h:inputText></td>
							<td>&nbsp;</td>
							<td style="width: 5%"><h:commandButton value="Submit Query" action="results" class="search_button"></h:commandButton></td>
							<td style="width: 5%"><h:commandButton value="Cube" action="cubo" class="search_button"></h:commandButton></td>
						</tr>
					</table>
				</h:form>
				</div> 
			</div>
            </article>
        </div>
    </div>
</header>
<div class="global indent">
    <!--content-->
    <div class="container">
        <div class="row">
            <article class="col-lg-12 col-md-12 col-sm-12 privacyBox">
                <ul class="list8">					

					#{mainBean.searchWithoutSuggestions()}
							<h2>Results for the query <i><h:outputLabel value="#{mainBean.resultWithoutSuggestions.originalQuery}"></h:outputLabel></i></h2>
							
				    	   	<h:dataTable value="#{mainBean.resultWithoutSuggestions.docs}" var="doc">
				    	   		<h:column>
				    	   			<div class="box effect6">
			                        <h3>#{doc.title}</h3>
									<p class="smart_link"><a href="file://#{doc.id}">#{doc.id}</a></p>
			                        <p class="snippet_class">#{doc.getSnippet()}</p>
									</div>				    	   			
				    	   		</h:column>
				    	   	</h:dataTable>
				
					<h:outputLabel rendered="#{empty mainBean.resultWithoutSuggestions.docs}"><h3>NOTHING FOUND! Try another search</h3></h:outputLabel>
					<!--
					<h:form>
						<h:commandButton value="New Search" action="main"></h:commandButton>
					</h:form>
					-->
                </ul>
            </article>
        </div>
    </div>
</div>
<!--footer-->
<footer>
    <div class="container">
        <div class="row">
            <article class="col-lg-12 col-md-12 col-sm-12">
                <p><span>Tag Cloud</span> </p>
                <ul>
                    <li><a href="#"><img src="img/follow_icon1.png" alt=""></img></a></li>
                    <li><a href="#"><img src="img/follow_icon2.png" alt=""></img></a></li>
                    <li><a href="#"><img src="img/follow_icon4.png" alt=""></img></a></li>
                </ul>
            </article>
        </div>
    </div>
</footer>
<script src="js/bootstrap.min.js"></script>
<script src="js/tm-scripts.js"></script>
<script src="js/snippet.js"></script>
</body>
</html>


<!-- SOURCE OLD -->
<!--
<h:head>
	<title>JSF 2.0</title>
</h:head>
<h:body bgcolor="white">
	<div align="center">
		<h:form>
    	   <h:inputText value="#{mainBean.queryString}"></h:inputText>
    	   <h:commandButton value="Submit Query" action="results"></h:commandButton>
    	   <h:commandButton value="Submit Image Query" action="imageResults"></h:commandButton>
    	</h:form>
	</div>
		

	<h3>JSF 2.0 - results.xhtml</h3>
	<h4>Results:</h4>
			#{mainBean.search()}
			<h4>Forse intendevi.. </h4><h:outputLabel value="#{mainBean.result.collatedQuery}"></h:outputLabel>
			
			<h:form>
				<h4>Oppure volevi cercare esattamente: </h4><h:commandLink value="#{mainBean.result.originalQuery}" action="resultsWithoutSuggestions"></h:commandLink>
    	   	</h:form>
    	   	
    	   	<h:dataTable value="#{mainBean.result.docs}" var="doc">
    	   		<h:column>
    	   			<a href="file://#{doc.id}">#{doc.id}</a>
    	   		</h:column>
    	   	</h:dataTable>

	<h:outputLabel rendered="#{empty mainBean.result.docs}"> NOTHING FOUND! PLEASE TRY AGAIN</h:outputLabel>
	<h:form>
		<h:commandButton value="New Search" action="main"></h:commandButton>
	</h:form>
</h:body>
</html>
-->


<!--
<h:head>
	<title>JSF 2.0</title>#{mainBean.resultWithoutSuggestions.docs}
</h:head>
<h:body bgcolor="white">
	<div align="center">
		<h:form>
    	   <h:inputText value="#{mainBean.queryString}"></h:inputText>
    	   <h:commandButton value="Submit Query" action="results"></h:commandButton>
    	   <h:commandButton value="Submit Image Query" action="imageResults"></h:commandButton>
    	</h:form>
	</div>
		

	<h3>JSF 2.0 - results.xhtml</h3>
	<h4>Results:</h4>
			#{mainBean.searchWithoutSuggestions()}
			<h4>Original Query: </h4><h:outputLabel value="#{mainBean.resultWithoutSuggestions.originalQuery}" ></h:outputLabel>
    	   	<h:dataTable value="#{mainBean.resultWithoutSuggestions.docs}" var="doc">
    	   		<h:column>
    	   			<a href="file://#{doc.id}">#{doc.id}</a>
    	   		</h:column>
    	   	</h:dataTable>

	<h:outputLabel rendered="#{empty mainBean.resultWithoutSuggestions.docs}"> NOTHING FOUND! PLEASE TRY AGAIN</h:outputLabel>
	<h:form>
		<h:commandButton value="New Search" action="main"></h:commandButton>
	</h:form>
</h:body>
</html>
-->
